#include "singleton.h"


Singleton *Singleton::Instance()
{
    _refcount++;
    if(!_self) _self = new Singleton();
       return _self;
}

void Singleton::FreeInst()
{
    _refcount--;
    if (!_refcount)
    {
        delete this;
        _self=0;
    }
}
